<template>
	<view class="fxDetails">
		<view class="details-box" v-if="rowDetails">
			<view class="fx-title">
				美食名称：{{fxDetails.goodsOut.title}}
			</view>
			<view class="fx-location">
				美食位置：{{fxDetails.goodsOut.location}}
			</view>
			<view class="fx-content">
				美食简介：{{fxDetails.goodsOut.content}}
			</view>
			<view class="fx-content">
				美食金额：{{fxDetails.goodsOut.money}} 元
			</view>
			<view class="fx-images">
				<img v-for="(item,index) in ImageList" :src="item" :key="index" alt="" srcset="">
			</view>
			<view class="fx-yhq-title" v-if="fxDetails.goodsDetails">
				优惠券名称：{{fxDetails.goodsDetails.title}}
			</view>
			<view class="fx-yhq-money" v-if="fxDetails.goodsDetails">
				优惠券金额：{{fxDetails.goodsDetails.Money}} 元
			</view>
			<view class="fx-time">
				购买时间：{{fxDetails.createTime}}
			</view>
			<view class="usemoney">
				总花费：{{fxDetails.useMoney}} 元
			</view>
		</view>
	</view>
</template>

<script>
	import http from "../../static/http.js"
	export default{
		name:"",
		data(){
			return{
				rowDetails:"",
				fxDetails:"",
				ImageList:[]
			}
		},
		onLoad(params) {
			this.rowDetails = params.details
		},
		created() {
			this.getDetails()
		},
		methods:{
			getDetails(){
				this.fxDetails = JSON.parse((this.rowDetails))
				this.fxDetails.goodsOut.imageList.forEach(val=>{
					this.ImageList.push( http.BASE_URL + val.url )
				})
			},
		}
	}
</script>

<style lang="less">
	.fxDetails{
		width: 100%;
		height: 100%;
		background-color: #f0f0f5;
		.details-box{
			width: 98%;
			height: 100%;
			margin: 0 auto;
			background-color: #fff;
			.fx-title{
				width: 100%;
				font-size: 35rpx;
				font-weight: 600;
				padding-top: 10rpx;
			}
			.fx-location{
				width: 100%;
				font-size: 28rpx;
				margin-top: 15rpx;
			}
			.fx-content{
				width: 100%;
				font-size: 28rpx;
				padding-top: 10rpx;
			}
			.fx-images{
				width: 100%;
				height: auto;
				img{
					width: 100%;
					height: 300rpx;
					object-fit: contain;
					margin-top: 20rpx;
				}
			}
			.fx-time{
				padding-bottom: 10rpx;
			}
		}
		
	}
</style>